package leetcode;

import java.util.List;

public class Solution {

    // 登录
    public void loginIn(String userName, String keyword) {
        Account account = new Account();
        account.status = 1;
    }

    // 登出
    public void loginOut(String userName, String keyword){
        Account account = new Account();
        account.status = 0;
    }

    public class Account{
        String useName;
        String keyWord;
        Integer status;
        List<String> chatIds;
    }

    // 聊天室抽象类
    public abstract class AbstractChat{
        Long chatId;

        List<Account> accounts;

        List<Message> messages;

        void sendMsg(Account account, Message message) {
        }
    }

    // 单聊
    public class One extends AbstractChat{
        @Override
        void sendMsg(Account account, Message message) {

        }

        One(Account accountA, Account accountB){
            this.accounts.add(accountA);
            this.accounts.add(accountA);
        }
    }

    // 群聊
    public class Room extends AbstractChat{

        @Override
        void sendMsg(Account account, Message message) {
        }

        // 加入聊天室
        public void entry(Account account) {
            accounts.add(account);
        }

        // 退出聊天室
        public void out(Account account) {
            accounts.remove(account);
        }
    }

    // 消息
    public class Message{
        String msg;
        String accountId;
        Long timeStamp;
    }
}
